home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 3394 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.4 KB  |  43 lines

  1. Path: newshost.lanl.gov!tanmoy
  2. From: tanmoy@qcd.lanl.gov (Tanmoy Bhattacharya)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: strings
  5. Date: 28 Jan 1996 17:43:05 GMT
  6. Organization: Los Alamos National Laboratory
  7. Message-ID: <TANMOY.96Jan28104305@qcd.lanl.gov>
  8. References: <4eg9qj$1ut4@sp115.ocs.lsu.edu>
  9. NNTP-Posting-Host: qcd.lanl.gov
  10. Mime-Version: 1.0
  11. Content-Type: text
  12. In-reply-to: eenaya@unix1.sncc.lsu.edu's message of 28 Jan 1996 16:55:47 GMT
  13.  
  14. In article <4eg9qj$1ut4@sp115.ocs.lsu.edu> eenaya@unix1.sncc.lsu.edu
  15. (Pradeep Nayar) writes: 
  16. <snip>
  17.    I saw this piece of code in a book somewhere.  
  18.  
  19. Throw away the book: immediately.
  20.  
  21.    ----
  22.    char *str ;
  23.  
  24.    str = "hello world"[10] ;
  25.  
  26.    _________
  27.  
  28.    what does the second line do?
  29.  
  30. Nothing meaningful. In fact, the compiler must tell you that this is
  31. incorrect: otherwise put your compiler exactly in the same place where
  32. your book deserves to go :-)
  33.  
  34. Cheers
  35. Tanmoy
  36. --
  37. tanmoy@qcd.lanl.gov(128.165.23.46) DECNET: BETA::"tanmoy@lanl.gov"(1.218=1242)
  38. Tanmoy Bhattacharya O:T-8(MS B285)LANL,NM87545 H:#9,3000,Trinity Drive,NM87544
  39. Others see <gopher://yaleinfo.yale.edu:7700/00/Internet-People/internet-mail>,
  40. <http://alpha.acast.nova.edu/cgi-bin/inmgq.pl>or<ftp://csd4.csd.uwm.edu/pub/
  41. internetwork-mail-guide>. -- <http://nqcd.lanl.gov/people/tanmoy/tanmoy.html>
  42. fax: 1 (505) 665 3003   voice: 1 (505) 665 4733    [ Home: 1 (505) 662 5596 ]
  43.